/**
 * Copyright (c) 2008, Daniel Gee. All Rights reserved.
 * See LICENSE.txt for more details.
 */
package com.rl.dungeon.fov;

import com.rl.dungeon.Location;

/**
 * VisionChecker provides a single function, that the {@link PrecisePermissiveFOV} class uses while
 * calculating FOV. A given roguelike might have more than one way to determine
 * blocking/non-blocking, and each way would require a separate kind of VisionChecker. This is sadly
 * about the best way you can simulate function passing in java.
 * 
 * @author Daniel Gee
 */
public interface VisionCheck
{
	/**
	 * Determines if the x,y coordinate given blocks vision. For different kinds of FOV spreads,
	 * different blocking conditions can be used. For example, fog might block normal sight but not
	 * block the spread of a fireball. For any given FOV calculation, this method can be called on a
	 * given square 0, 1, or 2 times. Most squares are only checked once or not at all, but squares
	 * directly north, south, east, or west of the center of the FOV might be checked twice.
	 * 
	 * @param location
	 *            the location in question.
	 * @return <tt>true</tt> if vision is blocked at this location, <tt>false</tt> otherwise.
	 */
	public boolean visionBlocked(Location location);
}
